

const routes = [{
  path: '/login',
  name: "login",
  hidden: true,
  meta: { title: '登录', icon: 'dashboard', affix: true },
  component: () => import('@/views/login.vue')
},
{
  path: '/',
  component: () => import('@/layout/index.vue'),
  redirect: 'online-trans',
  hidden: false,
  name:'home',
  meta: { title: '', icon: 'dashboard', affix: true },
  children: [
    {
      path: 'online-trans',
      component: () => import('@/views/home/index.vue'),
      name: 'online-trans',
      hidden: false,
      meta: { title: '立即翻译', icon: 'dashboard', affix: true },
    },
    {
      path: 'knowledge',
      component: () => import('@/views/knowledge/index.vue'),
      name: 'knowledge',
      redirect: 'memory-libs',
      hidden: false,
      meta: { title: '知识库', icon: 'dashboard', affix: true },
      children: [
        {
          path: 'memory-libs',
          component: () => import('@/views/knowledge/memoryLibs/index.vue'),
          name: 'memory-libs',
          hidden: false,
          meta: { title: '记忆库', icon: 'dashboard', affix: true },
        },
        {
          path: 'term-libs',
          component: () => import('@/views/knowledge/termLibs/index.vue'),
          name: 'term-libs',
          hidden: false,
          meta: { title: '术语库', icon: 'dashboard', affix: true },
        },
        {
          path: 'create-libs',
          component: () => import('@/views/knowledge/createLibs/index.vue'),
          name: 'create-libs',
          hidden: true,
          meta: { title: '创建', icon: 'dashboard', affix: true },
        },
        {
          path: 'memory-libs-details/:id',
          component: () => import('@/views/knowledge/libsDetails/index.vue'),
          name: 'memory-libs-details',
          hidden: true,
          meta: { title: '详情', icon: 'dashboard', affix: true },
        },
        {
          path: 'term-libs-details/:id',
          component: () => import('@/views/knowledge/libsDetails/index.vue'),
          name: 'term-libs-details',
          hidden: true,
          meta: { title: '详情', icon: 'dashboard', affix: true },
        },
      ]
    },
    {
      path: 'quick-office',
      component: () => import('@/views/quickOffice/index.vue'),
      name: 'quick-office',
      redirect: 'file-convert',
      hidden: false,
      meta: { title: '快捷办公', icon: 'dashboard', affix: true },
      children: [
        {
          path: 'file-convert',
          component: () => import('@/views/quickOffice/fileConvert/index.vue'),
          name: 'file-convert',
          hidden: false,
          meta: { title: '格式转换', icon: 'dashboard', affix: true },
        },
       
      ]
    },
    {
      path: 'user',
      component: () => import('@/views/userInfo/index.vue'),
      name: 'user',
      redirect: 'profile',
      hidden: false,
      meta: { title: '用户中心', icon: 'dashboard', affix: true },
      children: [
        {
          path: 'profile',
          component: () => import('@/views/userInfo/profile/index.vue'),
          name: 'profile',
          hidden: false,
          meta: { title: '个人中心', icon: 'dashboard', affix: true },
        },
       
      ]
    },

  ]
},

]

export default routes;